package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.CrmFlowModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by lusong on 2016/11/15.
 */
public interface CrmFlowRepository extends JpaRepository<CrmFlowModel,Integer>,JpaSpecificationExecutor<CrmFlowModel> {

    @Query("select a from CrmFlowModel a where a.historyId = ?1")
    List<CrmFlowModel> findFlowByHistoryId(int historyId);
}
